What is Hjson?
A configuration file format for humans. Relaxed syntax, fewer mistakes, more comments. See http://hjson.org
Data types that can be encoded are JavaScript types (see the serde_hjson:Value
enum for more
details):
Boolean
: equivalent to rust'sbool
I64
: equivalent to rust'si64
U64
: equivalent to rust'su64
F64
: equivalent to rust'sf64
String
: equivalent to rust'sString
Array
: equivalent to rust'sVec<T>
, but also allowing objects of different types in the same arrayObject
: equivalent to rust'sserde_hjson::Map<String, serde_hjson::Value>
Null
Examples of use
Parsing a str
to Value
and reading the result
//#![feature(custom_derive, plugin)]
//#![plugin(serde_macros)]
extern crate serde_hjson;
use Value;